# 综合使用示例
class Animal:
    species = "动物"

class Dog(Animal):
    def __init__(self, name):
        self.name = name

# 创建实例
my_dog = Dog("旺财")

# 分析对象结构
print("=== 对象分析 ===")
print(f"对象: {my_dog}")
print(f"对象类型: {my_dog.__class__}")
print(f"对象属性: {my_dog.__dict__}")
print(f"类名: {my_dog.__class__.__name__}")
print(f"父类: {my_dog.__class__.__base__}")
print(f"所有父类: {my_dog.__class__.__bases__}")
print(f"继承链: {my_dog.__class__.__mro__}")
print(f"类的子类: {Animal.__subclasses__()}")

